package ar.com.angrymachine.utils;

public class DecrementalTimer
{
    public int currentTime;
    public int intialTime;
    
    public DecrementalTimer(int eventTime)
    {
        this.currentTime = eventTime;
        intialTime = eventTime;
    }
    
    public void update(int deltaTime)
    {
        currentTime -= deltaTime;
        if(currentTime <= 0)
        {
            currentTime = 0;
        }
    }
    
    public boolean isComplete()
    {
        return 0 == currentTime;
    }
    
    public void reset()
    {
        currentTime = 0;
    }
}
